package com.weimob.cloud.api.shop.client;

import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Post;
import com.weimob.cloud.api.common.WeimobCloudRsp;
import com.weimob.cloud.api.shop.req.WeimobShopGetGoodsDetailReq;
import com.weimob.cloud.api.shop.req.WeimobShopGetGoodsListReq;
import com.weimob.cloud.api.shop.rsp.WeimobShopGetGoodsDetailRsp;
import com.weimob.cloud.api.shop.rsp.WeimobShopGetGoodsListRsp;
import com.weimob.cloud.api.token.interceptor.WeimobTokenInterceptor;

/**
 * 微盟云平台商城商品管理客户端接口
 */
@BaseRequest(baseURL = "https://dopen.weimob.com/fuwu/b/oauth2", interceptor = WeimobTokenInterceptor.class)
public interface WeimobShopGoodsClient {

    /**
     * 查询商品列表
     */
    @Post(url = "/apigw/weimob_shop/v2.0/goods/getList?accesstoken=${accessToken}")
    WeimobCloudRsp<WeimobShopGetGoodsListRsp> getGoodsList(@JSONBody WeimobShopGetGoodsListReq req);

    /**
     * 查询在售商品详情
     */
    @Post(url = "/apigw/weimob_shop/v2.0/goods/get?accesstoken=${accessToken}")
    WeimobCloudRsp<WeimobShopGetGoodsDetailRsp> getGoodsDetail(@JSONBody WeimobShopGetGoodsDetailReq req);
}
